/**Variable**/

.vxe-textarea {
  position: relative;
  display: inline-block;
  &:not(.def--cols) {
    width: 100%;
    .vxe-textarea--inner {
      width: 100%;
    }
  }
}

.vxe-textarea--inner {
  border-radius: $vxe-border-radius;
  outline: 0;
  font-size: inherit;
  padding: 0 0.6em;
  color: $vxe-font-color;
  line-height: inherit;
  border: 1px solid $vxe-input-border-color;
  background-color: $vxe-textarea-background-color;
  display: block;
  padding: 0.3em 0.6em;
  &::placeholder {
    color: $vxe-input-placeholder-color;
  }
  &:focus {
    border: 1px solid $vxe-primary-color;
  }
  &[disabled] {
    cursor: not-allowed;
    background-color: $vxe-input-disabled-background-color;
  }
}

.vxe-textarea--inner,
.vxe-textarea--autosize {
  line-height: $vxe-textarea-line-height;
  color: $vxe-font-color;
  font-family: $vxe-font-family;
}

.vxe-textarea--autosize {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0.3em 0.6em;
  word-wrap: break-word;
  white-space: pre-wrap;
  z-index: -1;
  visibility: hidden;
}

.vxe-textarea--count {
  position: absolute;
  bottom: 0.2em;
  right: 1.4em;
  padding-left: 0.2em;
  color: $vxe-textarea-count-color;
  background-color: $vxe-textarea-count-background-color;
  &.is--error {
    color: $vxe-textarea-count-error-color;
  }
}

.vxe-textarea,
.vxe-textarea--autosize {
  font-size: $vxe-font-size;
  &.size--medium {
    font-size: $vxe-font-size-medium;
  }
  &.size--small {
    font-size: $vxe-font-size-small;
  }
  &.size--mini {
    font-size: $vxe-font-size-mini;
  }
}

.vxe-textarea {
  &:not(.is--autosize) {
    min-height: $vxe-input-height-default;
  }
  &.size--medium {
    font-size: $vxe-font-size-medium;
    &:not(.is--autosize) {
      min-height: $vxe-input-height-medium;
    }
  }
  &.size--small {
    &:not(.is--autosize) {
      min-height: $vxe-input-height-small;
    }
  }
  &.size--mini {
    &:not(.is--autosize) {
      min-height: $vxe-input-height-mini;
    }
  }
}